<?php

/**
 * Created by PhpStorm.
 * User: giozola
 * Date: 2018/8/22
 * Time: 9:22
 */
class Common
{
    function subtext($text, $length){
        if (mb_strlen($text, ‘utf8’) > $length)
            return mb_substr($text, 0, $length, ’utf8′) . '……';
        return $text;
    }
}